@import "./../theme";
@import "./../var";

.iss-form-renderer {
  position: relative;
  min-height: 400px;
  box-sizing: border-box;
  margin: 0 auto;

  .renderer-form-header {
    height: 150px !important;
    background-position: right;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 6px 6px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;

    .renderer-form-title {
      width: 100%;
      color: $colorTextInverse;
      font-size: $fontSizeSuperLarge;
      padding: 0 2rem;
      font-weight: bold;
      word-break: break-all;
      line-break: anywhere;
    }

    .renderer-form-sub-title {
      width: 100%;
      color: $colorTextInverse;
      font-size: $fontSizeRegular;
      line-height: 1.3;
      padding: 0 2rem;
      word-break: break-all;
      margin-top: 0.5rem;
      line-break: anywhere;
    }

    &.align-left {
      text-align: left;
    }

    &.align-center {
      text-align: center;
    }

    &.align-right {
      text-align: right;
    }
  }

  .iss-form-item-wrapper {
    padding: 1rem 10px;
  }

  &.theme-blue {
    .renderer-form-header {
      background-image: url("./../../images/form_internal_bg_blue.png");
    }
  }

  &.theme-purple {
    .renderer-form-header {
      background-image: url("./../../images/form_internal_bg_purple.png");
    }
  }

  &.theme-gov {
    .renderer-form-header {
      background-image: url("./../../images/form_internal_bg_gov.png");
    }
  }


  &.mobile {
    width: 100% !important;

    .renderer-form-header {
      background-size: auto 80px;
      background-position: top;
      border-bottom: 1px solid $borderColorLighter;
      height: auto!important;

      .renderer-form-title {
        color: $colorTextInverse;
        font-size: $fontSizeExtraLarge;
        height: 80px;
        line-height: 1.1;
        padding: 0 1.5rem;
        display: flex;
        align-items: center;
      }

      .renderer-form-sub-title {
        color: $colorTextInfo;
        font-size: $fontSizeSmall;
        line-height: 1.2;
        padding: 0 1.5rem;
        margin-top: 0.9rem;
        margin-bottom: 0.9rem;
      }

      &.align-left {
        .renderer-form-title {
          justify-content: flex-start;
        }
      }

      &.align-center {
        .renderer-form-title {
          justify-content: center;
        }
      }

      &.align-right {
        .renderer-form-title {
          justify-content: flex-end;
        }
      }
    }
  }

  *, :after, :before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }

  .form-option-load-failed {
    border: 1px solid $colorDangerLighten;
    background: $colorDangerLighten;
    border-radius: $radiusRegular;
    color: $colorDangerActive;
    padding: 0 1rem;
    margin: 2px 0;
    height: 2rem;
    line-height: 2rem;
    overflow: hidden;

    & > .el-button {
      float: right;
      color: $colorTextPrimary;
    }
  }
}
